package dao;

import java.util.List;

import model.Subject;
import modelInterfaces.IObject;
import modelInterfaces.ISubject;

/**
*
* Interface that all ObjectDAOs must support
*/
public interface IObjectDAO {
    
	/**
	 * Create a {@link Object} in database depending a parameter object.
	 * @param object	object to be created
	 * @throws DAOException
	 * @see Object
	 */	
	public void create(IObject object) throws DAOException;

	
	/**
	 * Create a {@link Object} in database depending a parameter object.
	 * @param object	object to be created
	 * @throws DAOException
	 * @see Object
	 */		
	public void delete(IObject object) throws DAOException;
    
	
	/**
	 * Update a {@link Object} in database depending a parameter object.
	 * @param object	object to be updated
	 * @throws DAOException
	 * @see Object
	 */		
	public void update(IObject object) throws DAOException;
    
	
   
	/**
	 * Retrieve a list with all objects of database.
	 * @return list with all object of database. 
	 * @throws DAOException
	 * @see Object
	 */		
	public List<IObject> retrieveAll() throws DAOException;
    
	
	/**
	 * Retrieve a {@link Object} list in database depending of parameter subject.
	 * @param subject subject interacts with an object
	 * @return list of objects according to a subject
	 * @throws DAOException
	 * @see Object
	 * @see Subject
	 */		
	public List<IObject> retrieveAllFromSubject(ISubject subject) throws DAOException;
    
	
	/**
	 * Retrieve a {@link Object} list in database depending of parameter object.
	 * @param object object is not to retrieve 
	 * @return list of objects according to a object
	 * @throws DAOException
	 * @see Object
	 */	
	public List<IObject> retrieveAllExcept(IObject object) throws DAOException;
}
